/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:
 * Date: 2024-05-13
 * Time: 20:44
 */
public class Test {
    public static int max(int[] arr) {
        for (int i = 0; i < arr.length; i++) {
            int count = 0;
            int k = i;
            for (int j = 0; j < arr.length && j != i; j++) {
                if (arr[k] == arr[j]) {
                    count++;
                }
            }
            if (count > arr.length / 2) {
                System.out.print(arr[i] + " ");
            }
        }
        return 1;
    }

    public static void main5(String[] args) {
        int[] arr = {1, 2, 3, 2, 2, 2, 2,};
        max(arr);
    }

    public static void jishu(int[] arr){
        int count = 0;
        for (int i = 0; i < arr.length-2; i++) {
            if(arr[i] % 2 == 1 && arr[i+1] % 2 == 1 && arr[i+2] % 2 == 1) {
                count++;
            }
            }
        if(count >= 1){
            System.out.println(true);
        }else{
            System.out.println(false);
        }
    }
    public static void main(String[] args){
        int[] arr = {1,3,5,8,9};
        jishu(arr);
    }

      /*  public static void main(String[] args) {
            int[] arr = {2, 6, 4, 1};
            int[] arr2 = {1, 2, 34, 3, 4, 5, 7, 23, 12};
            isOdd(arr);
            isOdd(arr2);
        }

        private static void isOdd(int[] arr) {
            int count = 0;
            for (int i = 0; i < arr.length - 2; i++) {
                if (arr[i] % 2 != 0 && arr[i + 1] % 2 != 0 && arr[i + 2] % 2 != 0) {
                    count++;
                }
            }
            if (count >= 1) {
                System.out.println(true);
            } else {
                System.out.println(false);
            }
        }
*/
    }


